#include<stdio.h>

int main(){
	int a, b, t, r, n;
	printf("shuru liangge shu:\n");
	scanf("%d %d",&a,&b);
	if(a < b){
		t = b;
		b = a;
		a = t;
	}
	r = a%b;
	n = a*b;
	while(r != 0){
		a = b;
		b = r;
		r = a%b;
	}
	printf("zheliangge shude zuida gongyueshu shi %d,zuixiao gong beishu shi %d\n",b,n/b);
	return 0;
}
